/**
 * \file parse.h
 * \brief Headers for ATerm to Code parsing
 * \author Wouter Caarls <w.caarls@tnw.tudelft.nl>
 *
 * \verbatim
 * Copyright (c) 2005 Wouter Caarls, Delft University of Technology
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * \endverbatim
 */

#include <vector>
#include <aterm2.h>

#include "Code.h"

typedef struct stratego_def_s
{
  typedef std::vector<struct stratego_def_s>::iterator DI;
  typedef std::vector<std::string>::iterator PI;

  std::string name;
  std::vector<std::string> params;
  ATermList def;
} stratego_def_t;

Code *parseATerm(ATerm term);
Code *parseCFile(const char *name);
Code *parseC(const char *str);
Code *parseFile(int argc, char **argv, char *filename);
bool isStrategoDef(std::string name);
